package com.tianyu.inspection.entity;

import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**********************************
 * @Author YSW
 * @Description
 * @Date 2021/1/5 - 11:05
 **********************************/

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName(autoResultMap = true)
public class HighConsequenceAreas implements Serializable {

    @TableId
    private Integer id;

    /**
     * 名称
     */
    private String name;

    /**
     * 编号
     */
    private String number;

    /**
     * 高后果区等级
     */
    private Integer level;

    /**
     * 描述
     */
    private String description;

    /**
     * 缓冲区距离(米)
     */
    private Integer distance;

    /**
     * 区域位置点
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONArray polygonPoints;

    /**
     * 区域点集合[非数据库字段]
     */
    @TableField(exist = false)
    private JSONArray polygonPointList;

    /**
     * 起始桩号
     */
    private String startPileCardNumber;

    /**
     * 结束桩号
     */
    private String endPileCardNumber;

    /**
     * 备注
     */
    private String remark;

    /**
     * 责任人姓名
     */
    private String dutyPerson;

    /**
     * 责任人联系方式
     */
    private String dutyMobile;

    /**
     * 高后果区类型ID
     */
    private Integer highConsequenceAreasTypeId;

    /**
     * 管线站场ID
     */
    private Integer pipelineStationId;

    /**
     * 管线ID
     */
    private Integer pipelineId;

    /**
     * 施工单位所属项目ID
     */
    private Integer projectId;

    /**
     * 数据库记录状态
     */
    @JsonIgnore
    private Integer state;
    private Date createTime;
    private Date modifyTime;

    /**
     * 桩牌类型名称
     */
    @TableField(exist = false)
    private String highConsequenceAreasTypeName;

    /**
     * 桩牌类型ICON
     */
    @TableField(exist = false)
    private String highConsequenceAreasTypeIcon;

    /**
     * 管道名称[非数据库字段]
     */
    @TableField(exist = false)
    private String pipelineName;

    /**
     * 站场名称[非数据库字段]
     */
    @TableField(exist = false)
    private String pipelineStationName;
}
